<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css" />
<link type="text/css"
	href="${pageContext.request.contextPath}/themes/icon.css"
	rel="stylesheet">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
<title>日志管理页</title>
</head>
<script type="text/javascript">
$(function(){
	
	$('#day').datagrid({    
	    url:'dailyReport',   
	    rownumbers:true,
	    columns:[[    
	        
	        {field:'drId',title:'id',width:100,hidden:true},    
	        {field:'drTime',title:'操作时间',width:240},    
	        {field:'drInfo',title:'操作信息',width:260},   
	        {field:'eName',title:'操作人员',width:180},       
	         ]],
	    pagination:true,
	    pagePosition:'bottom',
	    pageList:[18,15,25],
	    pageSize:5,
	    toolbar: [{ text: '操作人员<input type="text" id="employee" name="employee" style="width:100px" />'}
	    ,'-',{ text: '起始时间<input type="text" id="startTime" name="startTime" />'}
	    ,'-',{ text: '结束时间<input type="text" id="endTime" name="endTime"/>'},'-',{iconCls: 'icon-search',
			handler: function(){
				var time1=$('#startTime').datetimebox('getText');
				var time2=$('#endTime').datetimebox('getText');
				var emName=$('#employee').combobox('getText');
				if(time1>time2){
					$.messager.alert('提示','您好，起始时间不能超过结束时间','info');  
				}else{
					$('#day').datagrid({  
					    url:'seleDailyReport',   
					    rownumbers:true,
					    columns:[[     
					        {field:'drId',title:'id',width:100,hidden:true},    
					        {field:'drTime',title:'操作时间',width:240},    
					        {field:'drInfo',title:'操作信息',width:260},   
					        {field:'eName',title:'操作人员',width:180},       
					         ]],
					    pagination:true,
					    pagePosition:'bottom',
					    pageList:[18,15,25],
					    pageSize:5,  
					    queryParams:{'date1':time1,'date2':time2,'emName':emName},
					}); 
					 $('#startTime').datetimebox({  
						    required: false,    
						    showSeconds: true,   
						});
						$('#endTime').datetimebox({    
						    required: false,    
						    showSeconds: true,   
						});
						$('#employee').combobox({    
						    url:'seleEmployee',    
						    valueField:'rid',    
						    textField:'rtext',
						    lines:true,
						    panelHeight:'auto',
						    editable:true,
						}); 
				}
			}
		}],
	}); 
	
	 $('#startTime').datetimebox({     
		    required: false,    
		    showSeconds: true,   
		});
		$('#endTime').datetimebox({        
		    required: false,    
		    showSeconds: true,   
		});
		$('#employee').combobox({    
		    url:'seleEmployee',    
		     valueField:'rid',    
		    textField:'rtext',
		    lines:true,
		    panelHeight:'auto',
		    editable:true,
		}); 

		

})
</script>
<body>
  <table id="day">
  </table>
</body>
</html>